package com.zp.qualitypractice.mvp3;



import io.reactivex.Observable;

/**
 * Created by izp on 2017/7/2.
 */

public class DataCenter {
    private static DataCenter dataManager;
    private Apis retrofitService;

    public static DataCenter getInstance() {
        return dataManager == null ? dataManager = new DataCenter() : dataManager;
    }

    private DataCenter() {
        retrofitService = RetrofitHelper.getInstance().getRetrofitService();
    }

    /**
     * 获取快递信息
     *
     * @param type   快递类型
     * @param postid 快递单号
     * @return Observable<ExpressInfo>
     */
    public Observable<ExpressInfo> getExpressInfo(String type, String postid) {
        return retrofitService.getExpressInfoRx(type, postid);
    }
}
